#include <stdio.h>
#include <stdlib.h>
#include "aimage.h"

int main( int argc, const char *argv[] )
{
	AIMAGE image;
	int width, height;
	float best_sample=-1;
	int best_shift=-1;

	if ( argc != 1 && argc != 2 )
	{
		fprintf(stderr, "%s [in_file]\n", argv[0] );
		exit( 1 );
	}

	if ( argc == 2 )
	{
		fprintf(stderr, "reading image %s\n", argv[1] );
		image.readppm( argv[1] );
	}
	else
	{
		image.readppm( "stdin" );
	}

	fprintf(stderr, "Hueshift\n");
	image.hueshift( 0.3 );

	image.writeppm( "stdout", false );
}

